package com.automannn.seataSamples.account.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;

/**
 * @author automannn
 * @Date 2022/3/24
 */
@TableName("t_account")
@Data
public class AccountPO extends Model<AccountPO> {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.AUTO)
    /**
     * 账户唯一标识
     */
    private Integer id;

    /**
     * 账户所属用户
     */
    private String userId;

    /**
     * 账户余额
     */
    private Double amount;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
